package com.dcm.bargain.service;

import com.dcm.bargain.entity.BargainEntity;
import com.dcm.common.exception.MyException;
import com.github.pagehelper.PageInfo;
import java.util.List;

/**
 * @author:zhouyuhan
 * 时间: 2021/3/27 15:34
 */
public interface BargainService {

    /**
     * 添加
     * @return
     */
    List<BargainEntity> findAll();

    /**
     * 删除
     * @param id
     * @throws MyException
     */
    void delete(Long id)throws MyException;

    /**
     * 模糊姓名和id
     * @param id
     * @param bargainName
     * @return
     * @throws MyException
     */
    List<BargainEntity> findbargainByIdAndName(Long id, String bargainName)throws MyException;

    /**
     * 添加砍价商品
     * @param bargainEntity
     * @throws MyException
     */
    void add(BargainEntity bargainEntity)throws MyException;

    /**
     * 修改砍价列表
     * @param bargainEntity
     * @throws MyException
     */
    void update(BargainEntity bargainEntity)throws MyException;

    /**
     * 回显
     * @param id
     * @return
     * @throws MyException
     */
    BargainEntity echo(Long id)throws MyException;

    /**
     * 分页
     * @param pageSize
     * @param currentPage
     * @return
     * @throws MyException
     */
    PageInfo<BargainEntity> findPage(Integer pageSize, Integer currentPage)throws MyException;

    /**
     * 通过id修改状态
     * @param id
     * @param status
     * @throws MyException
     */
    void updateStatus(Long id, Integer status)throws MyException;



}
